<!DOCTYPE html>
<html lang="zh-CN"
      xmlns:th="http://www.thymeleaf.org">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="新零售微店登录页面">
    <meta name="author" content="">
    <link rel="icon" th:href="@{/bootstrap/images/favicon.ico}">
    <title>Signin Template for Bootstrap</title>
    <link th:href="@{/bootstrap/css/bootstrap.min.css}" rel="stylesheet">
    <link th:href="@{/bootstrap/css/signin.css}" rel="stylesheet">
    <script th:src="@{/bootstrap/js/ie8-responsive-file-warning.js}"></script>
    <script th:src="@{/bootstrap/js/ie-emulation-modes-warning.js}"></script>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  </head>
  <body>
    <div class="container">
      <form id="formlogin" class="form-signin" th:action="@{/sysAdminLogin}" method="post">
        <img th:src="@{/bootstrap/images/favicon.ico}">
        <!--<h2 class="form-signin-heading">新零售微店后台系统</h2>-->
        <p style="color: red" th:text="${msg}" ></p>
        <label for="username" class="sr-only">用户名:</label>
        <input type="text" id="username" class="form-control" name="username" placeholder="请输入用户名！" value="">
        <label for="password" class="sr-only">密 码:</label>
        <input type="password" id="password" class="form-control" name="password" placeholder="请输入密码！" value="">
        <div class="checkbox">
          <label>
            <input type="checkbox" value="remember-me"> 记住我
          </label>
        </div>
        <button class="btn btn-lg btn-primary btn-block" type="button" id="login-btn" onclick="login()">登录</button>
      </form>

    </div> <!-- /container -->

    <script th:src="@{/bootstrap/js/ie10-viewport-bug-workaround.js}"></script>
  <script type="text/javascript">
      function login() {
            var username= document.getElementById("username").value;
            var password= document.getElementById("password").value;

          if (username!="" && password!= "") {
              document.getElementById("formlogin").submit();
          } else {
              alert("用户名或密码不能为空！");
          }
      }
  </script>
  </body>
</html>
